Optimal. Leaf size=146 \[ -\frac {3 b n x}{4 e}+\frac {1}{4} b n x^2+\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 e}-\frac {1}{4} x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {b n \log (1+e x)}{4 e^2}-\frac {1}{4} b n x^2 \log (1+e x)-\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{2 e^2}+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)-\frac {b n \text {Li}_2(-e x)}{2 e^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 146, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2442, 45, 2423,
2438} \begin {gather*} -\frac {b n \text {PolyLog}(2,-e x)}{2 e^2}-\frac {\log (e x+1) \left (a+b \log \left (c x^n\right )\right )}{2 e^2}+\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 e}+\frac {1}{2} x^2 \log (e x+1) \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {b n \log (e x+1)}{4 e^2}-\frac {1}{4} b n x^2 \log (e x+1)-\frac {3 b n x}{4 e}+\frac {1}{4} b n x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 2423
Rule 2438
Rule 2442
Rubi steps
\begin {align*} \int x \left (a+b \log \left (c x^n\right )\right ) \log (1+e x) \, dx &=\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 e}-\frac {1}{4} x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{2 e^2}+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)-(b n) \int \left (\frac {1}{2 e}-\frac {x}{4}-\frac {\log (1+e x)}{2 e^2 x}+\frac {1}{2} x \log (1+e x)\right ) \, dx\\ &=-\frac {b n x}{2 e}+\frac {1}{8} b n x^2+\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 e}-\frac {1}{4} x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{2 e^2}+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)-\frac {1}{2} (b n) \int x \log (1+e x) \, dx+\frac {(b n) \int \frac {\log (1+e x)}{x} \, dx}{2 e^2}\\ &=-\frac {b n x}{2 e}+\frac {1}{8} b n x^2+\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 e}-\frac {1}{4} x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} b n x^2 \log (1+e x)-\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{2 e^2}+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)-\frac {b n \text {Li}_2(-e x)}{2 e^2}+\frac {1}{4} (b e n) \int \frac {x^2}{1+e x} \, dx\\ &=-\frac {b n x}{2 e}+\frac {1}{8} b n x^2+\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 e}-\frac {1}{4} x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {1}{4} b n x^2 \log (1+e x)-\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{2 e^2}+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)-\frac {b n \text {Li}_2(-e x)}{2 e^2}+\frac {1}{4} (b e n) \int \left (-\frac {1}{e^2}+\frac {x}{e}+\frac {1}{e^2 (1+e x)}\right ) \, dx\\ &=-\frac {3 b n x}{4 e}+\frac {1}{4} b n x^2+\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 e}-\frac {1}{4} x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {b n \log (1+e x)}{4 e^2}-\frac {1}{4} b n x^2 \log (1+e x)-\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{2 e^2}+\frac {1}{2} x^2 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)-\frac {b n \text {Li}_2(-e x)}{2 e^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 131, normalized size = 0.90 \begin {gather*} \frac {2 a e x-3 b e n x-a e^2 x^2+b e^2 n x^2-2 a \log (1+e x)+b n \log (1+e x)+2 a e^2 x^2 \log (1+e x)-b e^2 n x^2 \log (1+e x)+b \log \left (c x^n\right ) \left (e x (2-e x)+2 \left (-1+e^2 x^2\right ) \log (1+e x)\right )-2 b n \text {Li}_2(-e x)}{4 e^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.12, size = 725, normalized size = 4.97
method | result | size |
risch | \(\frac {x^{2} \ln \left (e x +1\right ) a}{2}+\frac {i \pi b \,x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{8}-\frac {i \ln \left (e x +1\right ) \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4 e^{2}}+\frac {3 a}{4 e^{2}}-\frac {\ln \left (e x +1\right ) b \ln \left (c \right )}{2 e^{2}}+\frac {b \ln \left (c \right ) \ln \left (e x +1\right ) x^{2}}{2}-\frac {a \ln \left (e x +1\right )}{2 e^{2}}-\frac {\ln \left (c \right ) b \,x^{2}}{4}+\left (\frac {b \,x^{2} \ln \left (e x +1\right )}{2}-\frac {b \left (e^{2} x^{2}-2 e x +2 \ln \left (e x +1\right )\right )}{4 e^{2}}\right ) \ln \left (x^{n}\right )-\frac {x^{2} a}{4}+\frac {b n \,x^{2}}{4}-\frac {b n}{e^{2}}+\frac {b \ln \left (c \right ) x}{2 e}+\frac {a x}{2 e}-\frac {3 b n x}{4 e}+\frac {3 b \ln \left (c \right )}{4 e^{2}}-\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \left (e x +1\right ) x^{2}}{4}+\frac {i \ln \left (e x +1\right ) \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{4 e^{2}}-\frac {i x \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{4 e}-\frac {b n \dilog \left (e x +1\right )}{2 e^{2}}-\frac {3 i \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{8 e^{2}}+\frac {i \pi b \,x^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{8}-\frac {i \ln \left (e x +1\right ) \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4 e^{2}}+\frac {i \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (e x +1\right ) x^{2}}{4}+\frac {i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \left (e x +1\right ) x^{2}}{4}+\frac {i x \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4 e}+\frac {i x \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{4 e}-\frac {3 i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{8 e^{2}}+\frac {b n \ln \left (e x +1\right )}{4 e^{2}}-\frac {b n \,x^{2} \ln \left (e x +1\right )}{4}-\frac {i x \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{4 e}+\frac {i \ln \left (e x +1\right ) \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{4 e^{2}}-\frac {i \pi b \,x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{8}-\frac {i \pi b \,x^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{8}+\frac {3 i \pi b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{8 e^{2}}+\frac {3 i \pi b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{8 e^{2}}-\frac {i \pi b \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \left (e x +1\right ) x^{2}}{4}\) | \(725\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.34, size = 163, normalized size = 1.12 \begin {gather*} -\frac {1}{2} \, {\left (\log \left (x e + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-x e\right )\right )} b n e^{\left (-2\right )} + \frac {1}{4} \, {\left (b {\left (n - 2 \, \log \left (c\right )\right )} - 2 \, a\right )} e^{\left (-2\right )} \log \left (x e + 1\right ) + \frac {1}{4} \, {\left ({\left (b {\left (n - \log \left (c\right )\right )} - a\right )} x^{2} e^{2} - {\left (b {\left (3 \, n - 2 \, \log \left (c\right )\right )} - 2 \, a\right )} x e - {\left ({\left (b {\left (n - 2 \, \log \left (c\right )\right )} - 2 \, a\right )} x^{2} e^{2} - 2 \, b n \log \left (x\right )\right )} \log \left (x e + 1\right ) - {\left (b x^{2} e^{2} - 2 \, b x e - 2 \, {\left (b x^{2} e^{2} - b\right )} \log \left (x e + 1\right )\right )} \log \left (x^{n}\right )\right )} e^{\left (-2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x\,\ln \left (e\,x+1\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________